PulseCanvas / app · pulsecanvas.ai / Sources / PulseCanvas / Resources / ProjectM / Presets / Geometric / Cathedral / xtramartin (99).milk
| 1 | MILKDROP_PRESET_VERSION=201 |
| 2 | PSVERSION=3 |
| 3 | PSVERSION_WARP=3 |
| 4 | PSVERSION_COMP=3 |
| 5 | [preset00] |
| 6 | fRating=5.000000 |
| 7 | fGammaAdj=1.980 |
| 8 | fDecay=0.500 |
| 9 | fVideoEchoZoom=1.000 |
| 10 | fVideoEchoAlpha=0.500 |
| 11 | nVideoEchoOrientation=3 |
| 12 | nWaveMode=6 |
| 13 | bAdditiveWaves=1 |
| 14 | bWaveDots=0 |
| 15 | bWaveThick=1 |
| 16 | bModWaveAlphaByVolume=1 |
| 17 | bMaximizeWaveColor=0 |
| 18 | bTexWrap=1 |
| 19 | bDarkenCenter=0 |
| 20 | bRedBlueStereo=0 |
| 21 | bBrighten=0 |
| 22 | bDarken=1 |
| 23 | bSolarize=0 |
| 24 | bInvert=0 |
| 25 | fWaveAlpha=0.001 |
| 26 | fWaveScale=1.893 |
| 27 | fWaveSmoothing=0.540 |
| 28 | fWaveParam=0.380 |
| 29 | fModWaveAlphaStart=0.810 |
| 30 | fModWaveAlphaEnd=1.400 |
| 31 | fWarpAnimSpeed=1.459 |
| 32 | fWarpScale=2.007 |
| 33 | fZoomExponent=1.00000 |
| 34 | fShader=0.000 |
| 35 | zoom=0.99990 |
| 36 | rot=0.00000 |
| 37 | cx=0.500 |
| 38 | cy=0.500 |
| 39 | dx=0.00000 |
| 40 | dy=0.00000 |
| 41 | warp=0.01000 |
| 42 | sx=0.99990 |
| 43 | sy=1.00000 |
| 44 | wave_r=0.000 |
| 45 | wave_g=0.000 |
| 46 | wave_b=0.000 |
| 47 | wave_x=0.500 |
| 48 | wave_y=0.500 |
| 49 | ob_size=0.000 |
| 50 | ob_r=0.000 |
| 51 | ob_g=0.000 |
| 52 | ob_b=0.000 |
| 53 | ob_a=1.000 |
| 54 | ib_size=0.260 |
| 55 | ib_r=0.250 |
| 56 | ib_g=0.250 |
| 57 | ib_b=0.250 |
| 58 | ib_a=0.000 |
| 59 | nMotionVectorsX=64.000 |
| 60 | nMotionVectorsY=48.000 |
| 61 | mv_dx=0.000 |
| 62 | mv_dy=0.000 |
| 63 | mv_l=1.850 |
| 64 | mv_r=0.500 |
| 65 | mv_g=0.500 |
| 66 | mv_b=0.500 |
| 67 | mv_a=0.000 |
| 68 | b1n=0.000 |
| 69 | b2n=0.000 |
| 70 | b3n=0.000 |
| 71 | b1x=1.000 |
| 72 | b2x=1.000 |
| 73 | b3x=1.000 |
| 74 | b1ed=0.000 |
| 75 | wavecode_0_enabled=0 |
| 76 | wavecode_0_samples=342 |
| 77 | wavecode_0_sep=0 |
| 78 | wavecode_0_bSpectrum=1 |
| 79 | wavecode_0_bUseDots=0 |
| 80 | wavecode_0_bDrawThick=1 |
| 81 | wavecode_0_bAdditive=0 |
| 82 | wavecode_0_scaling=0.04505 |
| 83 | wavecode_0_smoothing=0.00000 |
| 84 | wavecode_0_r=1.000 |
| 85 | wavecode_0_g=1.000 |
| 86 | wavecode_0_b=1.000 |
| 87 | wavecode_0_a=1.000 |
| 88 | wave_0_per_point1=x = .5+.1*sample; y = .5; |
| 89 | wave_0_per_point2=r = 0; g = 0; b = 0; |
| 90 | wavecode_1_enabled=0 |
| 91 | wavecode_1_samples=100 |
| 92 | wavecode_1_sep=0 |
| 93 | wavecode_1_bSpectrum=0 |
| 94 | wavecode_1_bUseDots=1 |
| 95 | wavecode_1_bDrawThick=1 |
| 96 | wavecode_1_bAdditive=0 |
| 97 | wavecode_1_scaling=0.89152 |
| 98 | wavecode_1_smoothing=0.00000 |
| 99 | wavecode_1_r=1.000 |
| 100 | wavecode_1_g=1.000 |
| 101 | wavecode_1_b=1.000 |
| 102 | wavecode_1_a=0.100 |
| 103 | wave_1_per_point1=mul = sin(time/17)*51; |
| 104 | wave_1_per_point2= |
| 105 | wave_1_per_point3=x = q5/3+.5+ + .15*sin(sample*mul); |
| 106 | wave_1_per_point4=y = q6/3+.5 + .15*sin(sample*32+time/13); |
| 107 | wavecode_2_enabled=0 |
| 108 | wavecode_2_samples=512 |
| 109 | wavecode_2_sep=0 |
| 110 | wavecode_2_bSpectrum=0 |
| 111 | wavecode_2_bUseDots=0 |
| 112 | wavecode_2_bDrawThick=1 |
| 113 | wavecode_2_bAdditive=0 |
| 114 | wavecode_2_scaling=0.89152 |
| 115 | wavecode_2_smoothing=0.82000 |
| 116 | wavecode_2_r=1.000 |
| 117 | wavecode_2_g=1.000 |
| 118 | wavecode_2_b=1.000 |
| 119 | wavecode_2_a=0.100 |
| 120 | wavecode_3_enabled=0 |
| 121 | wavecode_3_samples=512 |
| 122 | wavecode_3_sep=0 |
| 123 | wavecode_3_bSpectrum=1 |
| 124 | wavecode_3_bUseDots=1 |
| 125 | wavecode_3_bDrawThick=0 |
| 126 | wavecode_3_bAdditive=0 |
| 127 | wavecode_3_scaling=1.00000 |
| 128 | wavecode_3_smoothing=0.50000 |
| 129 | wavecode_3_r=1.000 |
| 130 | wavecode_3_g=1.000 |
| 131 | wavecode_3_b=1.000 |
| 132 | wavecode_3_a=1.000 |
| 133 | wave_3_per_point1=ra = .8; |
| 134 | wave_3_per_point2=rb = .5; |
| 135 | wave_3_per_point3=pib = 6.28318530718; |
| 136 | wave_3_per_point4= |
| 137 | wave_3_per_point5= |
| 138 | wave_3_per_point6=tic = min(time-tin,.1); |
| 139 | wave_3_per_point7=tin = if(equal(sample,0),time,tin); |
| 140 | wave_3_per_point8= |
| 141 | wave_3_per_point9=mod = 1.5 + .5*sin(time*.15); |
| 142 | wave_3_per_point10=med = 1.5 + .5*sin(time*.134); |
| 143 | wave_3_per_point11=med = 5; |
| 144 | wave_3_per_point12=amod = 3; |
| 145 | wave_3_per_point13= |
| 146 | wave_3_per_point14=vr = int(rand(10001))*.0001; |
| 147 | wave_3_per_point15=rb = rb + int(rand(10001))*.0001*.1; |
| 148 | wave_3_per_point16= |
| 149 | wave_3_per_point17=a = vr; |
| 150 | wave_3_per_point18= |
| 151 | wave_3_per_point19=sa = vr*pib*.5; |
| 152 | wave_3_per_point20=sp = sa*mod + q1*1.3; |
| 153 | wave_3_per_point21=sam = sa*med - q1*.219; |
| 154 | wave_3_per_point22= |
| 155 | wave_3_per_point23=ox = ra*sin(sam*pib); |
| 156 | wave_3_per_point24=oy = ra*cos(sam*pib); |
| 157 | wave_3_per_point25=ox = ox + rb*-cos(sp)*sin(sam*pib); |
| 158 | wave_3_per_point26=oz = rb*-sin(sp); |
| 159 | wave_3_per_point27=oy = oy + rb*-cos(sp)*cos(sam*pib); |
| 160 | wave_3_per_point28= |
| 161 | wave_3_per_point29= |
| 162 | wave_3_per_point30=xang = time*.132; |
| 163 | wave_3_per_point31=xang = q2; |
| 164 | wave_3_per_point32=yang = time*.153; |
| 165 | wave_3_per_point33=yang = q3; |
| 166 | wave_3_per_point34=zang = time*.110; |
| 167 | wave_3_per_point35=zang = q4; |
| 168 | wave_3_per_point36=fov = 0.6 + 0.2*sin(time); |
| 169 | wave_3_per_point37=fov = .5; |
| 170 | wave_3_per_point38= |
| 171 | wave_3_per_point39=mx = ox*cos(zang) - oy*sin(zang); |
| 172 | wave_3_per_point40=my = ox*sin(zang) + oy*cos(zang); |
| 173 | wave_3_per_point41=ox = mx; |
| 174 | wave_3_per_point42=oy = my; |
| 175 | wave_3_per_point43=mx = ox*cos(yang) + oz*sin(yang); |
| 176 | wave_3_per_point44=mz = - ox*sin(yang) + oz*cos(yang); |
| 177 | wave_3_per_point45=ox = mx; |
| 178 | wave_3_per_point46=oz = mz; |
| 179 | wave_3_per_point47=my = oy*cos(xang) - oz*sin(xang); |
| 180 | wave_3_per_point48=mz = oy*sin(xang) + oz*cos(xang); |
| 181 | wave_3_per_point49=oy = my; |
| 182 | wave_3_per_point50=oz = mz; |
| 183 | wave_3_per_point51= |
| 184 | wave_3_per_point52=oz = oz - 2; |
| 185 | wave_3_per_point53=x = ox*fov/oz + 0.5; |
| 186 | wave_3_per_point54=x = (x-.5)*0.75 + 0.5; |
| 187 | wave_3_per_point55=y = oy*fov/oz + 0.5; |
| 188 | wave_3_per_point56= |
| 189 | shapecode_0_enabled=1 |
| 190 | shapecode_0_sides=3 |
| 191 | shapecode_0_additive=0 |
| 192 | shapecode_0_thickOutline=1 |
| 193 | shapecode_0_textured=0 |
| 194 | shapecode_0_num_inst=82 |
| 195 | shapecode_0_x=0.530 |
| 196 | shapecode_0_y=0.500 |
| 197 | shapecode_0_rad=0.04915 |
| 198 | shapecode_0_ang=0.00000 |
| 199 | shapecode_0_tex_ang=0.00000 |
| 200 | shapecode_0_tex_zoom=1.87511 |
| 201 | shapecode_0_r=0.000 |
| 202 | shapecode_0_g=0.000 |
| 203 | shapecode_0_b=0.000 |
| 204 | shapecode_0_a=0.000 |
| 205 | shapecode_0_r2=0.000 |
| 206 | shapecode_0_g2=0.000 |
| 207 | shapecode_0_b2=0.000 |
| 208 | shapecode_0_a2=0.700 |
| 209 | shapecode_0_border_r=1.000 |
| 210 | shapecode_0_border_g=1.000 |
| 211 | shapecode_0_border_b=0.000 |
| 212 | shapecode_0_border_a=0.000 |
| 213 | shape_0_per_frame1=x0 = sin(instance *254); |
| 214 | shape_0_per_frame2=y0 = sin(instance *375); |
| 215 | shape_0_per_frame3= |
| 216 | shape_0_per_frame4=x = (x0+1)/2; |
| 217 | shape_0_per_frame5=y = (y0+1)/2; |
| 218 | shape_0_per_frame6=rad = .01 + .03*sin(instance * 12); |
| 219 | shape_0_per_frame7=angle = sin(instance * 112) |
| 220 | shapecode_1_enabled=0 |
| 221 | shapecode_1_sides=16 |
| 222 | shapecode_1_additive=0 |
| 223 | shapecode_1_thickOutline=1 |
| 224 | shapecode_1_textured=0 |
| 225 | shapecode_1_num_inst=1 |
| 226 | shapecode_1_x=0.600 |
| 227 | shapecode_1_y=0.800 |
| 228 | shapecode_1_rad=0.17916 |
| 229 | shapecode_1_ang=1.25664 |
| 230 | shapecode_1_tex_ang=0.00000 |
| 231 | shapecode_1_tex_zoom=2.27970 |
| 232 | shapecode_1_r=0.000 |
| 233 | shapecode_1_g=0.000 |
| 234 | shapecode_1_b=0.000 |
| 235 | shapecode_1_a=0.400 |
| 236 | shapecode_1_r2=0.000 |
| 237 | shapecode_1_g2=0.000 |
| 238 | shapecode_1_b2=0.000 |
| 239 | shapecode_1_a2=0.420 |
| 240 | shapecode_1_border_r=1.000 |
| 241 | shapecode_1_border_g=0.590 |
| 242 | shapecode_1_border_b=0.000 |
| 243 | shapecode_1_border_a=0.000 |
| 244 | shapecode_2_enabled=0 |
| 245 | shapecode_2_sides=4 |
| 246 | shapecode_2_additive=0 |
| 247 | shapecode_2_thickOutline=0 |
| 248 | shapecode_2_textured=1 |
| 249 | shapecode_2_num_inst=1 |
| 250 | shapecode_2_x=0.123 |
| 251 | shapecode_2_y=0.200 |
| 252 | shapecode_2_rad=0.54823 |
| 253 | shapecode_2_ang=0.00000 |
| 254 | shapecode_2_tex_ang=0.00000 |
| 255 | shapecode_2_tex_zoom=0.04154 |
| 256 | shapecode_2_r=1.000 |
| 257 | shapecode_2_g=1.000 |
| 258 | shapecode_2_b=1.000 |
| 259 | shapecode_2_a=1.000 |
| 260 | shapecode_2_r2=1.000 |
| 261 | shapecode_2_g2=1.000 |
| 262 | shapecode_2_b2=1.000 |
| 263 | shapecode_2_a2=0.200 |
| 264 | shapecode_2_border_r=0.500 |
| 265 | shapecode_2_border_g=0.500 |
| 266 | shapecode_2_border_b=0.500 |
| 267 | shapecode_2_border_a=0.000 |
| 268 | shapecode_3_enabled=0 |
| 269 | shapecode_3_sides=4 |
| 270 | shapecode_3_additive=0 |
| 271 | shapecode_3_thickOutline=0 |
| 272 | shapecode_3_textured=0 |
| 273 | shapecode_3_num_inst=1 |
| 274 | shapecode_3_x=0.500 |
| 275 | shapecode_3_y=0.510 |
| 276 | shapecode_3_rad=0.19869 |
| 277 | shapecode_3_ang=0.00000 |
| 278 | shapecode_3_tex_ang=1.00531 |
| 279 | shapecode_3_tex_zoom=0.49981 |
| 280 | shapecode_3_r=1.000 |
| 281 | shapecode_3_g=0.400 |
| 282 | shapecode_3_b=0.000 |
| 283 | shapecode_3_a=0.700 |
| 284 | shapecode_3_r2=1.000 |
| 285 | shapecode_3_g2=1.000 |
| 286 | shapecode_3_b2=1.000 |
| 287 | shapecode_3_a2=0.000 |
| 288 | shapecode_3_border_r=0.500 |
| 289 | shapecode_3_border_g=0.500 |
| 290 | shapecode_3_border_b=0.500 |
| 291 | shapecode_3_border_a=0.000 |
| 292 | per_frame_init_1=proxy = 3; pos_z = proxy*100; |
| 293 | per_frame_init_2=movz = 0; |
| 294 | per_frame_init_3=avg = 0; |
| 295 | per_frame_init_4=avg_= 2; |
| 296 | per_frame_1=dec_m = pow (0.95, 30/fps); dec_s = pow (0.99, 30/fps); |
| 297 | per_frame_2= |
| 298 | per_frame_3=beat = bass+mid+treb; |
| 299 | per_frame_4=avg = avg*dec_s + beat*(1-dec_s); |
| 300 | per_frame_5=avg_ = avg_*dec_s + avg*(1-dec_s); |
| 301 | per_frame_6=is_beat = above(beat, 4+avg+peak) * above (time, t0+1); |
| 302 | per_frame_7=t0 = is_beat*time + (1-is_beat)*t0; |
| 303 | per_frame_8=peak = is_beat * beat + (1-is_beat)*peak*dec_m; |
| 304 | per_frame_9=index = (index + is_beat) %16; |
| 305 | per_frame_10=//index2 = (index2 + is_beat*bnot(index))%8; |
| 306 | per_frame_11=q20 = avg_/3; |
| 307 | per_frame_12=q22 = max(0,peak-.0)+.01; |
| 308 | per_frame_13=q24 = is_beat; |
| 309 | per_frame_14=q27 = index +1; |
| 310 | per_frame_15= |
| 311 | per_frame_16=push = (avg-2.5)/3; |
| 312 | per_frame_17=ax = -(xang + min(max(push,-.7),.7))/3; //Divisor: 1/Frequenz |
| 313 | per_frame_18= |
| 314 | per_frame_19=ax = if (below(ax,0),ax*2,ax); |
| 315 | per_frame_20=vx = vx *(1-1/fps)+ ax/fps; //1/fps: Daempfung |
| 316 | per_frame_21=xang = xang + vx/fps; |
| 317 | per_frame_22=// WINKEL |
| 318 | per_frame_23=zang = 0; |
| 319 | per_frame_24=yang = - .5*sin(time/16); |
| 320 | per_frame_25=//yang = .7; |
| 321 | per_frame_26= |
| 322 | per_frame_27=//BEWEGUNG |
| 323 | per_frame_28=movz= if(above(avg_/3,1.2),1,movz); |
| 324 | per_frame_29=movz = if(below(avg_/3,.9),-1,movz); |
| 325 | per_frame_30=proxy = proxy + movz/fps/4; |
| 326 | per_frame_31=proxy = min(max(proxy,1.1),4); |
| 327 | per_frame_32=proxy = 4-3*abs(sin(time/24)); |
| 328 | per_frame_33=pos_z = dec_s * pos_z + (1-dec_s)*proxy*100; |
| 329 | per_frame_34= |
| 330 | per_frame_35=trelx = trelx + .1*sin(time/11)/fps*yang; |
| 331 | per_frame_36=q5 = trelx; |
| 332 | per_frame_37=trely = trely + xang*.2/fps; q6 = trely; |
| 333 | per_frame_38=//q6 = time*.03; |
| 334 | per_frame_39=vleaf = vleaf + (avg/64)/fps; |
| 335 | per_frame_40=q29 = vleaf; |
| 336 | per_frame_41=lrot = lrot + bass_att/fps*.2; |
| 337 | per_frame_42=q32 = lrot; |
| 338 | per_frame_43= |
| 339 | per_frame_44=ox = 0; oy = 0; oz = pos_z; |
| 340 | per_frame_45=mx = ox*cos(zang) - oy*sin(zang); |
| 341 | per_frame_46=my = ox*sin(zang) + oy*cos(zang); |
| 342 | per_frame_47=ox = mx;oy = my; |
| 343 | per_frame_48=mx = ox*cos(yang) + oz*sin(yang); |
| 344 | per_frame_49=mz = - ox*sin(yang) + oz*cos(yang); |
| 345 | per_frame_50=ox = mx;oz = mz; |
| 346 | per_frame_51=my = oy*cos(xang) - oz*sin(xang); |
| 347 | per_frame_52=mz = oy*sin(xang) + oz*cos(xang); |
| 348 | per_frame_53=oy = my;oz = mz; |
| 349 | per_frame_54=q11=ox; q12 = oy; q13 = oz; //Position |
| 350 | per_frame_55= |
| 351 | per_frame_56=//Vektor x nach rechts |
| 352 | per_frame_57=ox = 1; oy = 0; oz = 0; |
| 353 | per_frame_58=mx = ox*cos(zang) - oy*sin(zang); |
| 354 | per_frame_59=my = ox*sin(zang) + oy*cos(zang); |
| 355 | per_frame_60=ox = mx;oy = my; |
| 356 | per_frame_61=mx = ox*cos(yang) + oz*sin(yang); |
| 357 | per_frame_62=mz = - ox*sin(yang) + oz*cos(yang); |
| 358 | per_frame_63=ox = mx;oz = mz; |
| 359 | per_frame_64=my = oy*cos(xang) - oz*sin(xang); |
| 360 | per_frame_65=mz = oy*sin(xang) + oz*cos(xang); |
| 361 | per_frame_66=oy = my;oz = mz; |
| 362 | per_frame_67=q14=ox; q15 = oy; q16 = oz; |
| 363 | per_frame_68= |
| 364 | per_frame_69= |
| 365 | per_frame_70=//Vektor z nach hinten |
| 366 | per_frame_71=ox = 0; oy = 0; oz = 1;; |
| 367 | per_frame_72= |
| 368 | per_frame_73=mx = ox*cos(zang) - oy*sin(zang); |
| 369 | per_frame_74=my = ox*sin(zang) + oy*cos(zang); |
| 370 | per_frame_75=ox = mx;oy = my; |
| 371 | per_frame_76=mx = ox*cos(yang) + oz*sin(yang); |
| 372 | per_frame_77=mz = - ox*sin(yang) + oz*cos(yang); |
| 373 | per_frame_78=ox = mx;oz = mz; |
| 374 | per_frame_79=my = oy*cos(xang) - oz*sin(xang); |
| 375 | per_frame_80=mz = oy*sin(xang) + oz*cos(xang); |
| 376 | per_frame_81=oy = my; |
| 377 | per_frame_82=oz = mz; |
| 378 | per_frame_83=q17=ox; q18 = oy; q19 = oz; |
| 379 | per_frame_84= |
| 380 | per_frame_85=q31 = 20/pos_z; |
| 381 | per_frame_86=q32 = pos_z; |
| 382 | per_pixel_1=zoom = .995; |
| 383 | warp_1=`sampler sampler_pw_noise_lq; |
| 384 | warp_2=` |
| 385 | warp_3=`float3 ret1, stone, window; |
| 386 | warp_4=`float2 rsk, uv1, uv2, uv3, uv4, dz1, Kugel1; |
| 387 | warp_5=`float mask1, rad1, rill; |
| 388 | warp_6=`static float iter6 = (rand_preset.z > .5); |
| 389 | warp_7=`shader_body { |
| 390 | warp_8=` |
| 391 | warp_9=`float dx = abs(.5-frac(uv.x*88))*0; |
| 392 | warp_10=`float dy = abs(.5-frac(uv.y*88))*1; |
| 393 | warp_11=`uv += float2(dx,dy)*.0; |
| 394 | warp_12=` |
| 395 | warp_13=`uv1 = float2(uv.x-.5,uv.y-0.5); |
| 396 | warp_14=` |
| 397 | warp_15=`float2 uv3 = uv1;float dist = 43+18*iter6; |
| 398 | warp_16=`uv3 = dist * uv1; |
| 399 | warp_17=` |
| 400 | warp_18=`float ky = saturate(.04-uv3.y/40); |
| 401 | warp_19=`float k1 = uv3.x*.8 ;; |
| 402 | warp_20=` |
| 403 | warp_21=`k1 = k1 - sign (k1)*14; //Verdoppelung |
| 404 | warp_22=`k1 = k1 - sign (k1)*11; //Verdoppelung |
| 405 | warp_23=`k1 = k1 - sign (k1)*(2+rand_preset.y*8); //Verdoppelung |
| 406 | warp_24=` |
| 407 | warp_25=`int n = 1 ; |
| 408 | warp_26=`float delta = .1; |
| 409 | warp_27=`while (n <= 4+2*iter6) |
| 410 | warp_28=`{ |
| 411 | warp_29=` k1 += (-16*n*sign(k1))*ky*ky; |
| 412 | warp_30=` ky = saturate (ky - delta); |
| 413 | warp_31=` delta *= 1; |
| 414 | warp_32=` n++; |
| 415 | warp_33=`} |
| 416 | warp_34=`float k2 = k1; |
| 417 | warp_35=`k1 = clamp(k1,-1.6,1.6); |
| 418 | warp_36=`stone = saturate(cos(k1) -.1); |
| 419 | warp_37=` |
| 420 | warp_38=`rill = (rand_preset-.3)*saturate(cos(8*k2))*stone; |
| 421 | warp_39=` |
| 422 | warp_40=`ret = max(stone/2, GetPixel((uv-.5)*2 |
| 423 | warp_41=`+float2(-q15,q16))*(.66)) -.2*rill - 0.01; |
| 424 | warp_42=`} |
| 425 | comp_1=`sampler sampler_pw_noise_lq; |
| 426 | comp_2=`static float quality = 2, depth = q31; |
| 427 | comp_3=`float3 neu, rsl, rsl2, rsl3, ret1, screen3, back,lcol, sky; |
| 428 | comp_4=`float2 uv0, uv1, uv2, uv4; |
| 429 | comp_5=`float lprof,lprof2,m,n,dist,cloud,mask, shadow, mask1,lmask,leaves,clshadow,gmask; |
| 430 | comp_6=`static float lav_gnd = 0; |
| 431 | comp_7=`static const float anz = 3; |
| 432 | comp_8=`static float2 mov = float2 (q5,q6); |
| 433 | comp_9=` |
| 434 | comp_10=`static float3 t = float3(q14,q15,q16); |
| 435 | comp_11=`static float3 s = float3(q17,q18,q19); |
| 436 | comp_12=`static float3 ts = -cross(s,t); |
| 437 | comp_13=`static float3 pos = float3 (q11,q12,q13); |
| 438 | comp_14=` |
| 439 | comp_15=`float3 project (float3 pos, float dist) { |
| 440 | comp_16=` float z; |
| 441 | comp_17=` z = dist/mul(cross(ts,-t),screen3) *(1-lav_gnd); |
| 442 | comp_18=` gmask = (z <= 0)*(z >= -8); |
| 443 | comp_19=` return gmask* float3(mul(float2x3(ts,t),cross(pos,screen3))*z/256,-z);} |
| 444 | comp_20=` |
| 445 | comp_21=`float3 lproject (float3 pos, float dist) { |
| 446 | comp_22=` float z; |
| 447 | comp_23=` z = dist/mul(cross(ts,-t),screen3) *(1-lav_gnd) ; |
| 448 | comp_24=` return (z<=0)*(z>=-4)* float3(mul(float2x3(ts,t),cross(pos,screen3))*z/256,-z);} |
| 449 | comp_25=` |
| 450 | comp_26=`float noise2 (float2 uvi) |
| 451 | comp_27=`{return 1*(tex2D (sampler_noise_hq,uvi) + 0*tex2D (sampler_noise_hq,uvi*4)/4);} |
| 452 | comp_28=` |
| 453 | comp_29=`shader_body {uv0 = uv; |
| 454 | comp_30=`screen3 = float3 ((uv-.5)*aspect.xy,1);//wirkt wie zoom / Tele ### |
| 455 | comp_31=` |
| 456 | comp_32=`//*****leaves********** |
| 457 | comp_33=`lav_gnd = tex2D (sampler_noise_hq,uv)*.03; |
| 458 | comp_34=`rsl3 = lproject(pos,1.5) + float3 (q29,-time/118,0) + float3 (mov,0); |
| 459 | comp_35=`float glmask = tex2D (sampler_pw_noise_lq,rsl3.x*.004) >= .3; |
| 460 | comp_36=`uv2 = rsl3.xy*16; |
| 461 | comp_37=`uv2.y += tex2D (sampler_pw_noise_lq,uv2.x/256).g*-2*time; |
| 462 | comp_38=`float3 noise = 8*tex2D (sampler_pw_noise_lq,uv2/256); |
| 463 | comp_39=`lmask = noise.g >= 7.; lmask *= glmask; |
| 464 | comp_40=`uv2 = frac(uv2); |
| 465 | comp_41=`float lside = sin((noise.b-8)*2*time+q32); |
| 466 | comp_42=`float lsize = 3*(noise.g-6); |
| 467 | comp_43=`leaves = lmask*lsize *(3+frac(4*uv2.x/uv2.y))/4 |
| 468 | comp_44=` -26*length((uv2-.5)*float2(1,2/lside)); |
| 469 | comp_45=`lcol = (1+tex2D (sampler_noise_hq,uv2/8+noise))* float3 (.8+lside/4,.5,0);; |
| 470 | comp_46=`lcol -= tex2D (sampler_noise_hq,uv2+noise).r*.25; |
| 471 | comp_47=`leaves = saturate(leaves); |
| 472 | comp_48=` |
| 473 | comp_49=`//**** main part ****** |
| 474 | comp_50=`lav_gnd = 0; |
| 475 | comp_51=`rsl = project (pos, 1)+float3 (time*.006,.6,0); |
| 476 | comp_52=`back = saturate(1-rsl.y); |
| 477 | comp_53=`cloud = saturate(noise2(rsl.xy/8*float2(1,4))-.4)*saturate(.5+back); |
| 478 | comp_54=`back *= float3(.7,.77,.96); |
| 479 | comp_55=`sky = lerp(back,2*cloud,cloud/2); |
| 480 | comp_56=`//sky = back; |
| 481 | comp_57=`//sky = back + cloud/4; |
| 482 | comp_58=`ret1 = sky; |
| 483 | comp_59=`lprof2 = 0; |
| 484 | comp_60=`for (n=anz; n >= 1; n--) { |
| 485 | comp_61=` dist = (n); lav_gnd = 0; mov += n/anz; |
| 486 | comp_62=` for (m=1; m <= quality; m++) { |
| 487 | comp_63=` rsl = project (pos, dist)+float3 (mov,0); |
| 488 | comp_64=` lprof = .5-lum(GetBlur1(frac(rsl.xy))); //mittelwert null !# |
| 489 | comp_65=` lav_gnd -= lprof/quality*depth/rsl.z; |
| 490 | comp_66=` } |
| 491 | comp_67=` |
| 492 | comp_68=` rsl = project (pos, dist)+float3 (mov,0) ; |
| 493 | comp_69=` rsl2 = project (pos, dist)+float3 (0,0,0); |
| 494 | comp_70=` int first = (n==1); |
| 495 | comp_71=` if (!first) {shadow = saturate(4*GetPixel(frac(rsl2.xy))) ;} |
| 496 | comp_72=` neu = GetPixel(frac(rsl.xy)); |
| 497 | comp_73=` float dista = length(rsl.xy)*.001; |
| 498 | comp_74=` mask = saturate(16/dist*lum(neu))*gmask; |
| 499 | comp_75=` neu *= 1-.5*lum(tex2D (sampler_noise_lq,rsl.xy*4)); |
| 500 | comp_76=` clshadow = clamp (q20*1.6-noise2(rsl.xy*float2(.02,.1)+float2(time*.01,0)),.2,1); |
| 501 | comp_77=` neu *= (1-shadow*.5* (!first))*clshadow; |
| 502 | comp_78=` |
| 503 | comp_79=`// neu *= saturate(noise2(rsl.xy/16+time*.01)+q20-.5+0*(rsl.z)) ; // Abdunkelung hinten |
| 504 | comp_80=` neu = lerp(back, neu, saturate(5-rsl.z)); //Nebel |
| 505 | comp_81=` ret1 = lerp(ret1,neu,mask) ; |
| 506 | comp_82=`} |
| 507 | comp_83=` |
| 508 | comp_84=`rsl = project (pos, dist)+float3 (mov+lprof/2,0); |
| 509 | comp_85=` |
| 510 | comp_86=`ret1 = lerp(ret1,leaves*(1-shadow/2)*clshadow*lcol, leaves*.5*saturate(!mask)); |
| 511 | comp_87=`//ret1 *= clshadow; |
| 512 | comp_88=`//ret = 1-exp(-ret1*2+.1) ; |
| 513 | comp_89=`ret = ret1; |
| 514 | comp_90=` |
| 515 | comp_91=`//ret = GetPixel(uv0); |
| 516 | comp_92=`} |
| 517 | comp_93=` |
| 518 | comp_94=`written by martin |
| 519 | comp_95=`END |